import {config} from "../config/config";
import {promisic} from "./util";
class Http{

    static async  request(url,data,method='get'){

       return  await promisic(wx.request)({
                url: `${config.apiBaseUrl}${url}`,
                header: {
                    appkey:config.appkey
                },
                method:method,
                data: data
         })

    }

}

export {
  Http
}